# -*- mode: snippet -*-
# name: future_map_fun from future
# key: future_map_fun@future
# contributor: Shuguang Sun
# --
prev_plan <- future::plan(
  strategy = future::multiprocess(workers = parallel::detectCores())
)
on.exit(future::plan(prev_plan))

res <- suppressMessages(
  furrr::future_map(${1:list}, function(${2:arg}) {
    ${3:body}
  }, .progress = ${4:TRUE})
)
$0